package com.xh.bussiness.resource.dao;

import com.xh.bussiness.resource.bean.dto.MaterialDto;
import com.xh.bussiness.resource.model.MaterialPrepare;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Pitt
 * @since 2020-12-18
 */
public interface MaterialPrepareMapper extends BaseMapper<MaterialPrepare> {

    List<Map<String, Object>> queryCountByType(@Param("courseIndexId") String courseIndexId, @Param("userId") String userId);

    List<MaterialDto> queryMaterialByCourseIndex(@Param("userId") String userId, @Param("courseIndexId")String courseIndexId, @Param("type")Integer type);

    void deletePrepareMaterial(@Param("courseIndexId") String courseIndexId,@Param("materialId") String materialId);
}
